import request from '@/utils/request'

export function fetchList(data) {
  return request({
    url: '/admin/user/index.html',
    method: 'post',
    data
  })
}

export function create(data) {
  return request({
    url: '/admin/user/addpost.html',
    method: 'post',
    data
  })
}

export function fetchOne(id) {
  return request({
    url: '/admin/user/edit/id/' + id + '.html',
    method: 'get'
  })
}

export function update(data) {
  return request({
    url: '/admin/user/editpost',
    method: 'post',
    data
  })
}

export function runType(id) {
  return request({
    url: '/admin/user/cancelban/id/' + id + '.html',
    method: 'get'
  })
}

export function stopType(id) {
  return request({
    url: '/admin/user/ban/id/' + id + '.html',
    method: 'get'
  })
}

export function quickLogin(id) {
  return request({
    url: '/admin/user/quick_logon/id/' + id + '.html',
    method: 'get'
  })
}


// ---------- new api ------------

